package com.fafu.mybatis.demo.mapper;

import com.fafu.mybatis.demo.modal.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ArticleInfoMapper {
    @Select("select ta.id, ta.title, ta.content, ta.uid, tb.username, tb.age, tb.gender from " +
            "article_info ta left join user_info tb on ta.uid = tb.id where ta.uid = #{id} ")
    List<ArticleInfo> QueryUserById(Integer id);
}
